package com.youth.entity.po;

import com.youth.AddGroup;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.Email;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
import java.util.List;

@Data
@NoArgsConstructor
@AllArgsConstructor
@ApiModel("用户对象")
public class User implements Serializable {
    private Integer id;

    @ApiModelProperty("用户名")
    @NotBlank(message = "用户名不能为空", groups = {AddGroup.class})
    private String username;

    @ApiModelProperty("密码")
    @NotBlank(message = "密码不能为空", groups = {AddGroup.class})
    private String password;

    @ApiModelProperty("邮箱")
    @Email
    private String email;

    private Integer roleId;

    private List<UserRole> userRoleList;


}